load(
    "@python_3_11//:defs.bzl",
    py_binary_311 = "py_binary",
)
load("@rules_python//python:defs.bzl", "py_library")

py_library(
    name = "lib",
    srcs = ["lib.py"],
    data = ["data/data.txt"],
    visibility = ["//visibility:public"],
    deps = ["@rules_python//python/runfiles"],
)

# This is used for testing mulitple versions of Python. This is
# used only when you need to support multiple versions of Python
# in the same project.
py_binary_311(
    name = "bin",
    srcs = ["bin.py"],
    data = ["data/data.txt"],
    main = "bin.py",
    visibility = ["//visibility:public"],
    deps = [
        ":lib",
        "@other_module_pip//absl_py",
        "@rules_python//python/runfiles",
    ],
)

exports_files(["data/data.txt"])
